home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wayzata's Best of Shareware PC/Windows 1
/
Wayzata's Best of Shareware for PC-Windows - Release 1 - Wayzata Technology (1993).iso
/
mac
/
DOS
/
PROGRAMG
/
JLIBV1
/
JLIB.DOC
next >
Wrap
Text File
|
1992-12-25
|
13KB
|
285 lines
JLib v1.0 Original Version -----------===================>> 12-25-92
A
product of InfoFlex Software
Hello and thank you for using JLib. JLib is a collection
of Functions and Sub Procedures for QuickBasic. My goal as
the creator of JLib is to make it available to anyone who
needs it. As time goes on I would like to build on to this
library. I will be contributing new functions monthly and
will also take any functions or sub prodcedures that I see
might be useful from anybody who wants to contribute.
If you have something that you would like to add to JLib
please send a listing of your function or procedure to:
InfoFlex Software
c/o Jason Young
7785 NW Mitchel DR.
Corvallis, OR 97330
ALL contributions that have a complete WORKING listing and
documentation (try to include an example) will be strongly
considered. This is your library. All of the contributors
names will be added to a list and distributed with each
copy of JLib.
Also if you would like the source code for any of these
functions or sub procedures you can send $20 to the address
above and a self addressed envelope (no stamp needed) to the
address above. The address above is also valid for any
questions or comments. ALL letters will be answered. Or
in the event you do not want to write a letter you can send
me E-Mail on The White Knight BBS (503) 753-7260 for Jason Young.
Thanx again for your support.
■-=%%%%%%%%%%%%%%%%%%%=-■
■-=% Jason Young %=-■
■-=% CEO of InfoFlex %=-■
■-=%%%%%%%%%%%%%%%%%%%=-■
Functions -
*********************************************************
* These Functions need to be declared in the *
* beginning of your program. *
* EXAMPLE *** *
* DECLARE FUNCTION Rand& () *
*********************************************************
Rand&()
EXAMPLE ***
Index& = Rand&()
DESCRIPTION
This function generates and pseudo-random Long
Integer.
NewWord$()
EXAMPLE ***
PassWord$ = NewWord$()
PRINT "Your password is: ", PassWord$
DESCRIPTION
NewWord$ generates a random, Semi-pernouncable word
Collision% (Object%(), BackGround%())
EXAMPLE ***
DO
PUT (x, y), Ball%
x = x + 1
y = y + 1
GET (x, y), BackGround%
IF Collision% (Ball%(), BackGround%()) THEN
PRINT "*** COLLISION!!! ***":END
END IF
PUT (x, y),Ball%
LOOP
DESCRIPTION
Collision% takes two integer GET/PUT arrays and
tests to see if any pixels overlap or if any pixels
are close to colliding. This is useful for doing
animations and writing arcade games.
Bin2Hex$ (Bin$)
EXAMPLE ***
PRINT "This program will return the hexedecimal form"
PRINT "of a binary number you enter"
PRINT
INPUT "What is you number: ", Bin$
PRINT "Your number in hex is: ";Bin2Hex$ (Bin$)
DESCRIPTION
This function converts any binary string to
hexedecimal form.
Shade& (Red!, Green!, Blue!)
EXAMPLE ***
FOR i = 1 to 15
PALETTE i, Shade&(i * .2, i * .3, i * .4)
COLOR i
PRINT "This is my favorite color!!!"
NEXT
DESCRIPTION
This function is very handy. You can rotate Palette
values to new colors customized by you. You must
supply a number between 1 to 0 to represent the
amount of red, green, or blue to mix into your new
color.
Shuffle$ (Text$, PrintType)
EXAMPLE ***
Text$ = "Wowsers"
Answer$ = Shuffle$(Text$, 1)
PRINT "Unscramble this word: "; Answer$
INPUT "", Guess$
IF Answer$ AND Guess$ THEN
PRINT "YES!!! That's it!!!"
END
ELSE
PRINT "NOPE!!!"
END
END IF
DESCRIPTION
Shuffle$ simply shuffles the order of the letters in
a string. The second argument, PrintType, lets you
format the string as you want. Here is a table that
shows the results of each value that can be passed to
the function:
Value Result Example
--------------------------------
| -1 | All of the | rewsows|
| | letters are | = |
| | returned in | Wowsers|
| | lowercase | |
| | letters. | |
--------------------------------
| 0 | The letters | reWsows|
| | will be | = |
| | returned as | Wowsers|
| | entered. | |
--------------------------------
| 1 | All of the | REWSOWS|
| | letters are | = |
| | returned in | Wowsers|
| | Caps. | |
--------------------------------
Sub Procedures-
DOSversion ()
EXAMPLE ***
PRINT "You are running DOS version: ";
CALL DOSversion
DESCRIPTION
DOSversion prints to the screen the current
DOS version.
FPrint (Word$, X, Y, C, B)
EXAMPLE ***
SCREEN 13
CALL FPrint ("WOW JLIB IS GREAT!", 20, 20, 2, 10)
DESCRIPTION
FPrint will take a string (Word$) and print it
anywhere on a graphics screen.
X - is the X Coordinate of where you want your
string printed.
Y - is the Y Coordinate of where you want your
string printed.
C - is the color to fill your letter with.
B - is the color for the border of your letter.
MouseFind (Found%)
EXAMPLE ***
CALL MouseFind (Found%)
IF Found% = 0 THEN
PRINT "No mouse found!!!"
END
ELSE
PRINT "Mouse found."
END
END IF
DESCRIPTION
MouseFind searches for a mouse driver. The variable
Found% returns either 1 or 0 (1 means its found, 0
means it wasn't).
ShowMouse
EXAMPLE ***
CALL MouseFind (Found%)
IF Found% = 0 THEN
PRINT "No mouse found!!!"
END
ELSE
PRINT "Mouse found."
END
END IF
CALL ShowMouse
DESCRIPTION
ShowMouse show the mouse cursor after the mouse is
found.
GetMouse (X, Y, Button)
EXAMPLE ***
CALL MouseFind (Found%)
IF Found% = 0 THEN
PRINT "No mouse found!!!"
END
ELSE
PRINT "Mouse found."
END
END IF
CALL ShowMouse
DO
CALL GetMouse(X, Y, Button)
LOCATE 1, 1
PRINT X, Y, BUTTON
LOOP UNTIL INKEY$ <> ""
DESCRIPTION
GetMouse returns information about the mouse.
X - X Coordinate of the mouse
Y - Y Coordinate of the mouse
Button -
1 - Left button
2 - Right button
4 - Both buttons
ShadowBox (ULc%, ULr%, LRc%, LRr%, Col%)
EXAMPLE ***
SCREEN 12
CALL ShadowBox (10, 10, 60, 60, 12)
DESCRIPTION
ShadowBox creates a graphic box with a dark gray
shadow.
ULc% - is the upper left column for the box
ULr% - is the upper left row for the box
LRc% - is the lower right column for the box
LRr% - is the lower right row for the box
Col% - is the color for the box
TextScroll (Text$, Delay%, Buffer%, Row%, LCol%, Col%, Escape%)
EXAMPLE ***
Text$ = "Wow I love JLib!!!"
Scroll:
CALL TextScroll (Text$, 10, 5, 10, 6, 4, Escape%)
IF Escape% <> 27 THEN GOTO Scroll:
DESCRIPTION
TextScroll scrolls any text across the screen.
Text$ - text to scroll
Delay% - You'll have to play with this to find a
decent speed.
Buffer% - The number of spaces to put between each
scroll of Text$.
Row% - The text row to scroll the string.
LCol% - The column to start the scroll at.
Escape% - The returned ASCII character number used
to exit the scroll
ReBoot ()
EXAMPLE ***
Password$ = "JLIB"
INPUT "Enter the system password: ", Guess$
IF Guess$ <> Password$ THEN CALL ReBoot
DESCRIPTION
Performes a soft reboot of your computer.
PrtSc()
EXAMPLE ***
FOR i = 1 to 1000
PRINT CHR$(INT(RND(78) * 254) + 1)
NEXT
CALL PrtSc()
DESCRIPTION
Dumps text screen to your printer.
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
Well that's it for this version. I hope you enjoy. There will
be more to come later.